import myaxios from '@/utils/request.js'

// 联想
function getThink (q) {
  return myaxios({
    url: '/app/v1_0/suggestion',
    method: 'get',
    needToken: false,
    params: {
      q: q
    }
  })
}

// 获得搜索结果
function getResult (page, perPage, q) {
  return myaxios({
    url: '/app/v1_0/search',
    method: 'get',
    needToken: false,
    params: {
      page: page,
      per_page: perPage,
      q: q
    }
  })
}

export { getThink, getResult }
